import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-sign-zc',
  templateUrl: './sign-zc.component.html',
  styleUrls: ['./sign-zc.component.scss']
})
export class SignZcComponent implements OnInit {

  constructor() { }

  ngOnInit(): void {

    $("#huoqyanzm button[name='button']").click(function (event) {
      //这里写发送验证码的代码
      var time = 60;
      settime($(this));
      function settime(obj) {
        if (time == 0) {
          $(obj).attr('disabled', false);
          $(obj).html("点击获取验证码");
          time = 60;
          return;
        } else {
          $(obj).attr('disabled', true);
          $(obj).html(time + "秒后重新发送");
          time--;
        }
        setTimeout(function () {
          settime(obj)
        }, 1000)
      }
    });
  }

}
